#include <8052.h>
#include "Serial.h"

void t0ValInit()
{
    TH0 = 55535 / 256;
    TL0 = 55535 % 256;
}

void t0Init()
{
    TMOD = 0x01;
    t0ValInit();
    TR0 = 1;
}

void interrupterInit()
{
    ET0 = 1;
    EA = 1;
}

void main()
{
    interrupterInit();
    t0Init();
    serialInit();
    while (1)
    {
    }
}
void t0Interrupt() __interrupt 1
{
    static char c;
    t0ValInit();
    c++;
    if (c == 100)
    {
        sendString("37.5");
        P2 = ~P2;
        c = 0;
    }
}